<?php

    if (!defined('BASEPATH'))
        exit('No direct script access allowed');

    if (!function_exists('constrAPI')) {

        function constrAPI($UID, $LANG, $CI) {

            require_once SHARED . 'class/website/restAPI.php';
            $myrestAPI = new restAPI(API_URL, GALLERY_URL, $UID, $LANG, $CI);
            return $myrestAPI;
        }

    }

    if (!function_exists('constrAPIcms')) {

        function constrAPIcms($LANG, $CI) {

            require_once SHARED . 'class/website/cmsAPI.php';
            $mycmsAPI = new cmsAPI(CMS_PHOTOS, CMS_FILES, $LANG, $CI);
            return $mycmsAPI;
        }

    }

    if (!function_exists('constrItem')) {

        function constrItem($data) {

            require_once SHARED . 'class/website/item.php';
            $myItem = new item($data);
            return $myItem->getItem();
        }

    }
    